#include "StdAfx.h"
#include ".\protocol.h"



void MakeHeartBeatMsg( TrackerMsgHeader* lpPacket )
{
	ASSERT( lpPacket );
	ASSERT( !IsBadWritePtr( lpPacket, sizeof(TrackerMsgHeader) ) );
	
	MakeMsgHeader( lpPacket, DISPATCH_REQUEST_HEART_BEAT,  0 );		
}


void MakeMsgHeader( TrackerMsgHeader* lpPacket, int cmd, DWORD dwDataLength )
{
	ASSERT( lpPacket );
	ASSERT( !IsBadWritePtr( lpPacket, sizeof(TrackerMsgHeader) ) );

	memset( lpPacket, 0, sizeof(TrackerMsgHeader) );

	sprintf( lpPacket->szHeader, "SHIYOUKTV" );
	lpPacket->wCmd = cmd;
	lpPacket->wVersion = 0x01;
	lpPacket->dwDataLength = dwDataLength;

}

